<div class="container" ng-controller="goodsInfoController">
    <div class="panel panel-default">
        <div class="panel-body">
            <div class="col-sm-6">
                <span class="glyphicon glyphicon-user">&nbsp;商品管理&nbsp;</span>
                <span class="glyphicon glyphicon-chevron-right">&nbsp;商品基本信息&nbsp;</span>
            </div>
            <div class="col-sm-6">
                <div class="col-sm-10">
                    <searchfilter selected-filter="selctedFilter" filter-str="filterStr" filter-types="filterTypes"></searchfilter>
                </div>
                <div class="col-sm-2 ">
                    <button type="button" class="btn btn-default" ng-click="addNewGoods()">
                        <span class="glyphicon glyphicon-plus">添加</span>
                    </button>
                </div>
            </div>
        </div>
    </div>
    <table class="table table-striped" ng-init="getGoodsInfo()">
        <tr>
            <th></th>
            <th>商品编号</th>
            <th>商品名称</th>
            <th>主图片</th>
            <th>创建时间</th>
            <th>更新时间</th>
            <th>简介</th>
            <th>操作</th>
        </tr>

        <tr ng-repeat="item in aGoodsInfo | filter: myFilter">
            <td>{{$index+startIndex}}</td>
            <td>{{item.commodityNo}}</td>
            <td>{{item.name}}</td>
            <td><img ng-src="{{item.pictureUrl}}" width="80px" height="80px" /></td>
            <td>{{item.createTime|date: 'yyyy-MM-dd HH:mm:ss'}}</td>
            <td>{{item.updateTime|date: 'yyyy-MM-dd HH:mm:ss'}}</td>
            <td><textarea rows="5" class="form-control goodsInfoText" maxlength="200" disabled>{{item.introduce}}</textarea></td>
            <td>
                <a ui-sref="goods/info/updateGoodsInfo({id:item.id})">修改</a>
            </td>
        </tr>
    </table>
    <pagination page-size="pageSize" page-no="pageNo" total-size="{{nTotalSize}}" page-nums="{{nPageNums}}" start-index={{startIndex}} end-index={{lastIndex}} refresh-method="getGoodsInfo()"></pagination>
</div>